package com.gzhryc.shared_device.cdcz.core.enums;

public enum ECDCZPlugWorkState {

    NotCharge(0, "未充电"), Charge(1, "充电"), PowerFillStop(2, "充满自停")
    , TimesFillStop(3, "时间到停"), MaxPowerFillStop(4, "最大电量到停"), ForceStop(5, "强制停")
    , OutStop(6, "拔出超时停");

    private Integer index;
    private String note;

    ECDCZPlugWorkState(Integer index, String note) {
        this.index = index;
        this.note = note;
    }

    public Integer index() {
        return index;
    }

    public String note() {
        return note;
    }

    public static String note(Integer index) {
        ECDCZPlugWorkState[] temp = ECDCZPlugWorkState.values();
        for (int i = 0; i < temp.length; i++) {
            ECDCZPlugWorkState item = temp[i];
            if (item.index.equals(index)) {
                return item.note;
            }
        }
        return null;
    }
}
